#define  _CRT_SECURE_NO_WARNINGS


#include<stdio.h>

int fun(int a, int b)
{
    int x = a, y = b, temp = 0;
    if (a > b)
    {
        while (y)
        {
            temp = x % y;
            x = y;
            y = temp;
        }
        return x;
    }
    else if (a < b)
    {
        while (x)
        {
            temp = y % x;
            y = x;
            x = temp;
        }
        return y;
    }
}
int main()
{
    int n = 0, a[10] = { 0 }, b[10] = { 0 }, i = 0, max = 0, temp = 0, flag = 0, j = 0, t = 0, sum = 0;
    scanf("%d", &n);
    for (i = 0; i < n; i++)
    {
        scanf("%d/%d", &a[i], &b[i]);
        if (b[i] > b[max])
            max = i;
    }
    temp = b[max];
    for (i = 0; 1; i++)
    {
        flag = 1;
        for (j = 0; j < n; j++)
        {
            if (temp % b[j] != 0)
            {
                flag = 0;
                break;
            }
        }
        if (flag == 1)
            break;
        temp += b[max];
    }
    for (i = 0; i < n; i++)
    {
        sum += a[i] * temp / b[i];
    }
    while (fun(sum, temp) != 1)
    {
        t = fun(sum, temp);
        sum /= t;
        temp /= t;
    }
    printf("%d/%d\n", sum, temp);

    return 0;
}